// src\stores\app.ts
import { defineStore } from 'pinia'
import { LANG_VALUE } from '@/common/enum'
import { getLanguage } from '@/lang'
interface LanguageState {
  language: string
}
const useLangStore = defineStore('language', {
  state: (): LanguageState => ({
    language: getLanguage(),
  }),
  getters: {
    locale(state) {
      switch (state.language) {
        case LANG_VALUE.En:
          return null
        case LANG_VALUE.Zh:
          return null
        default:
          break
      }
    },
  },
  persist: {
    storage: localStorage,
  },
})

export default useLangStore
